Skip to content

ci: Several improvements#684

Closed
simensrostad wants to merge 3 commits into
mainfrom
att/bootloader/tests
Closed

ci: Several improvements#684
simensrostad wants to merge 3 commits into
mainfrom
att/bootloader/tests

Conversation

@simensrostad
Copy link
Copy Markdown
Contributor

@simensrostad simensrostad commented May 26, 2026

  • Add MCUBoot FOTA tests to CI for T91x boards, will be added for DKs later when partitions are the same across the boards.
  • Make triggering specific tests in CI easier by adding a filter that can isolate tests. (Used for testing)

Its expected that CI will be red until NCS has been updated.

Add a `test_filter` / `pytest_args` workflow input that lets callers
pass a pytest `-k` expression to run a subset of tests. The filter is
forwarded from `build-and-target-test.yml` to `target-test.yml`, where
it gets appended to the pytest invocation.

Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
Add `erase_secondary_trailer()` to wipe the last 4 KiB of the MCUboot
secondary slot before each FOTA download starts.

`stream_flash` skips the trailer sector during writes, and on external
SPI-NOR flash the stale trailer causes `boot_set_pending()` to fail
with `-EFAULT` after an otherwise successful download.

Add fakes for `flash_area_open`, `flash_area_erase`, and
`flash_area_close` to the FOTA module tests.

Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
Add `test_bootloader_fota` to verify B1 MCUboot FOTA on Thingy:91 X.
Checks `bootloaderVersion` in nRF Cloud shadow before (v2) and after
(v3) the update, and verifies B0 UART output post-swap.

Also refactor the FOTA poll loop into `trigger_fota_poll`, pass
`MCUBOOT_BUNDLEID` env var through CI, and set a default signing key
for nRF9151 DK in sysbuild config.

Setting the signing key will allow us to run the test on the DK as well.
This will be added once the new DTS partition schema is in place.

Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant